#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<math.h>
int arr1[10001];
int judge(int j)
{
	if (j == 2 || j == 3)
	{
		return 1;
	}
	for (int i = 2; i <= sqrt(j); i++)
	{
		if (j % i == 0)
		{
			return 0;
		}
	}
	return 1;
}
int main()
{
	int a = 2;
	int b;
	int m, n;
	scanf("%d%d", &m, &n);
	int s = 2;
	for (int i = 0; i <= 10000; i++)
	{
		do
		{
			if (judge(s) == 1)
			{
				arr1[i] = s;
			}
			s++;
		} while (!judge(s));
	}
	int x = m;
	for (x; x <= n; x++)
	{
		if ((x - m + 11) % 10 == 0)
		{
			printf("%d\n", arr1[x - 1]);
		}
		else if (x == n)
		{
			printf("%d", arr1[x - 1]);
		}
		else
		{
			printf("%d ", arr1[x - 1]);
		}
	}
	return 0;
}
